-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RadioControl: Convert component to TypeScript #41568
Conversation
Size Change: -11 B (0%) Total Size: 1.24 MB
ℹ️ View Unchanged
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work @walbo 👍
This is all testing well for me.
✅ No typing errors
✅ Works in Storybook
✅ Works in editors
✅ Readme aligns with types
LGTM 🚢
props: Omit< | ||
WordPressComponentProps< RadioControlProps, 'input', false >, | ||
'ref' | ||
> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A bit late to the party, but I was curious about why it was necessary to omit ref
? Was it causing any errors ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Opened #41641 to add ref forwarding support
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Didn't want to add any runtime changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good, and I agree that it's a good rationale! I was mostly curious to know in case it caused any type errors :)
What?
Converts the
RadioControl
component to TypeScript.Why?
Part of the @wordpress/components's TypeScript migration (#35744).
How?
Refactors the current
RadioControl
to TypeScript.Testing Instructions
RadioControl
continues to function as expected